package com.whfc.common.third.uni;

import com.whfc.common.exception.BizException;
import com.whfc.common.third.uni.entity.*;

/**
 * 宇视科技监控摄像头API接口
 */
public interface UniApi {

    /**
     * 获取访问令牌
     */
    String getAccessToken() throws BizException;

    /**
     * 查询组织
     */
    OrganizationSearchResponse searchOrganizations(Integer pageNo, Integer pageSize) throws BizException;

    /**
     * 查询资源
     */
    ResourceSearchResponse searchResources(String resourceType, Integer pageNo, Integer pageSize) throws BizException;

    /**
     * 查询监控点录像片段
     */
    CameraRecordSearchResponse searchCameraRecords(String channelIndexCode, String beginTime,
            String endTime, Integer recordLocation,
            Integer streamType, Integer pageStart,
            Integer pageSize) throws BizException;

    /**
     * 获取监控点取流回放URL
     */
    CameraPlaybackUrlResponse getCameraPlaybackUrl(String channelIndexCode, String beginTime,
            String endTime) throws BizException;

    /**
     * 获取监控点预览起流URL
     */
    CameraPreviewUrlResponse getCameraPreviewUrl(String channelIndexCode, Integer transMode,
            String protocol, Integer streamType) throws BizException;

    /**
     * 查询预置位
     */
    PresetSearchResponse searchPresets(String channelIndexCode) throws BizException;

    /**
     * 设置预置位
     */
    BaseResponse addPreset(String channelIndexCode, Integer presetIndex, String presetName) throws BizException;

    /**
     * 调用预置位
     */
    BaseResponse gotoPreset(String channelIndexCode, Integer presetIndex) throws BizException;

    /**
     * 删除预置位
     */
    BaseResponse deletePreset(String channelIndexCode, Integer presetIndex) throws BizException;

    /**
     * 事件订阅
     */
    EventSubscriptionResponse subscribeEvent(String eventDest, String[] eventTypes) throws BizException;

    /**
     * 取消事件订阅
     */
    EventSubscriptionResponse unsubscribeEvent(String eventDest, String[] eventTypes) throws BizException;
}